﻿import Movie from "./Movie";

function MovieList({movies,onSelectMovie}){
    return (
        <div>
            <ul className={"list"}>
                {movies?.map((movie) => (
                    <Movie movie={movie} key={movie.imdbID} onSelectMovie={onSelectMovie}/>
                ))}
            </ul>
        </div>
    );

}

export default MovieList;